Use BD_SYS_SESION
Go
-- Exec GRUsuario_Loguear 'cramos', 'carlos'
Create Procedure dbo.GRUsuario_Loguear(
   @vLogUsu varchar(20),
   @vPasUsu varchar(20)
)
As
Begin

   Select 
      iCodUsu,
      vLogUsu,
      vApePat,
      vApeMat,
      vNomUsu,
      vPasUsu,
      bActivoUsu,
      iCodUsuA,
      vNomTer,
      dtFecAct
   From GRUsuario a(Nolock)   
   Where vlogusu = @vLogUsu
     And vPasUsu = @vPasUsu
   
End